﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZebraCoreLib.ZebraException
{
   [Serializable]
   public class ZebraDataException:ApplicationException
   {
       public List<string> MessagePoor = new List<string>();
       public int ErrorCount { get {return MessagePoor.Count; } }


       public ZebraDataException()
           : base()
       {
         
       }
       public ZebraDataException(string message):base(message)
       {
           if(!string.IsNullOrEmpty(message))
               MessagePoor.Add(message);
            
       }
       public ZebraDataException(string message, Exception inner) : base(message, inner) 
       {
           if (!string.IsNullOrEmpty(message))
               MessagePoor.Add(message);
       }

       public override string Message
       {
           get
           {
               string message = "";
               foreach (string m in MessagePoor)
               {
                   message += m + "\r\n";
               }
               return message;
           }
       }

   }
}
